/*
@STI LICENSE
(C) 2006-2008 Universit�t Innsbruck.

This file is part of myOntology.

myOntologyis free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

myOntologyis distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with myOntology.  If not, see <http://www.gnu.org/licenses/>.

@STI LICENSE */
package model.dataContainer;

import java.util.ArrayList;

import org.openrdf.model.URI;

public class DatatypePropertyContainer extends AbstractPropertyContainer {
	
	private URI range;

	public DatatypePropertyContainer() {
		range = null;
	}
	
	public boolean setRange( URI val ) throws Exception {
		
		boolean ret = true;
		try {
			
			if( val != null )
				this.range = val;
			
		} catch (Exception e) {
//			System.out.println( this.getClass().toString() + " setRange: " + e.getMessage() );
			ret = false;
			
			throw e;
		}
		return ret;
			
	}
	
	public URI getRange() {
		return this.range;
	}
	
	/**
	 * If getRange!=null this method will return an ArrayList containing 1 element (the range) 
	 * @return
	 */
	public java.util.ArrayList<URI> getRangeAsArray() {
		
		java.util.ArrayList<URI> ret = null;
		
		if( this.range!=null ) {
			ret = new ArrayList<URI>();
			ret.add( this.range );
		}
		
		return ret;
	}
	
	
	/* see RDFS Datamodel.vsd
	 * 
	 * rdf:ID (1)
	 * 
	 * rdfs:label (*)
	 * rdfs:comment (*)
	 * rdfs:seeAlso (*)
	 * 
	 * mo:createdAt (1)
	 * mo:belongsToOntology (1)
	 * 
	 * rdfs:domain
	 * rdfs:range
	 * 
	 * also see Klassendiagramm.vsd
	 */
	


}
